int Pattern(LinkList A, LinkList B){
    if(!B->next) return 1;
    LNode *pa = A->next, *pb = B->next;
    while(pa){
        while(pb){
            if(pa->data != pb->data) break;
            pa = pa->next;
            pb = pb->next;
            if(!pb) return 1;
        }
        pa = pa->next;
        pb = B->next;
    }
    return 0;
}